package com.spt.springbootzhsx.service.suggest.Get_MovieToMovieCounts_3;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

/**
 * 计算电影共现矩阵
 */
public class GetMTMC_Main {
    public static void domain() throws Exception {
        Configuration conf = new Configuration();


        Job job=Job.getInstance(conf,"计算电影共现矩阵");
        job.setJarByClass(GetMTMC_Main.class);
        job.setMapperClass(GetMTMC_Mapper.class);
        job.setReducerClass(GetMTMC_Reducer.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(Text.class);

        FileInputFormat.setInputPaths(job,new Path("src/main/java/com/spt/springbootzhsx/service/suggest/suggestOut/output/step02/part-r-00000"));
        FileOutputFormat.setOutputPath(job,new Path("src/main/java/com/spt/springbootzhsx/service/suggest/suggestOut/output/step03"));
        job.waitForCompletion(true);
    }
}
